package com.youlu.campus.web.config.task;


import com.youlu.campus.web.config.aspect.TaskType;
import com.youlu.campus.web.certificate.CertificateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CertificateTask {

    @Autowired
    private CertificateService certificateService;

    /**
     * 同步证书
     */
    @Scheduled(cron = "0 30 0 * * ?")
    @TaskType
    public void syncCertificate(){
        certificateService.syncCertificate();
    }
}
